﻿/// ****************************************************************************
/// Author:	        Robin Zhu
/// Create Date:	2012-4-18
/// Purpose: 		路由表参数默认值配置元素类定义文件
/// ****************************************************************************
/// Modify By		Date			Remark
/// Robin           2012-5-17       增加CookieName属性
/// ****************************************************************************
/// 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace RB.Web.Mvc
{
    /// <summary>
    /// 路由表参数默认值配置元素类
    /// </summary>
    public class RouteDefaultValueConfigElement : ConfigurationElement
    {
        [ConfigurationPropertyAttribute("key", IsRequired = true, IsKey = true)]
        public string Key
        {
            get
            {
                return (string)this["key"];
            }
            set
            {
                this["key"] = value;
            }
        }

        [ConfigurationPropertyAttribute("value")]
        public string Value
        {
            get
            {
                return (string)this["value"];
            }
            set
            {
                this["value"] = value;
            }
        }

        [ConfigurationPropertyAttribute("optional", DefaultValue = false)]
        public bool Optional
        {
            get
            {
                return (bool)this["optional"];
            }
            set
            {
                this["optional"] = value;
            }
        }

        [ConfigurationPropertyAttribute("passThrough", DefaultValue = false)]
        public bool PassThrough
        {
            get
            {
                return (bool)this["passThrough"];
            }
            set
            {
                this["passThrough"] = value;
            }
        }

        [ConfigurationPropertyAttribute("cookieName", IsRequired=false)]
        public string CookieName
        {
            get
            {
                return (string)this["cookieName"];
            }
            set
            {
                this["cookieName"] = value;
            }
        }
    }
}
